import React, { Component } from "react";
import itemcss from "./index.module.css";

export default class index extends Component {
  goToHtml = (url) => {
    return () => {
      window.open(url)
    }
  }
  render() {
    let { login, avatar_url, html_url } = this.props.item
    return (
      <div className={itemcss.imagebox} onClick={this.goToHtml(html_url)}>
        <img src={avatar_url} alt="" />
        <div>{login}</div>
      </div>
    );
  }
}
